<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="view/admin/style/basic.css" />
<link rel="stylesheet" type="text/css" href="view/admin/style/order.css" />
</head>
<body>

<h2>订单 -- 订单列表</h2>
<div id="list">
    <table>
        <tr><th>订单号</th><th>下单时间</th><th>总金额</th><th>订单状态</th><th>操作</th></tr>
        {foreach from=$allOrder key=key item=value}    
        <tr><td><a href="?a=order&m=update&id={$value->id}">{$value->ordernum}</a></td><td>{$value->date}</td><td>{$value->price}</td><td>
        {if $value->order_state == '已取消'}
            <span style="color:red">已取消</span>
        {else}
            {if $value->refund == 1}
                <span style="color:#666">申请退款</span>
            {else}
                {if $value->refund == 2}
                <span style="color:green;">退款成功</span>
                {else}
                    {if $value->order_delivery == '已发货'}
                         <span style="color:green">已发货</span>
                    {else}
                        {if $value->order_delivery == '已配货'}
                            <span style="color:green">已配货,等待发货</span>
                        {else}
                            {if $value->order_pay == '已付款'}
                                <span style="color:green">已付款</span>
                            {else}
                                {if $value->order_state == '已确认'}
                                    <span style="color:green">已确认，等到收款</span>
                                {else}
                                    <span style="color:#666">未确认</span>
                                {/if}
                            {/if}
                        {/if}
                    {/if}
                {/if}    
            {/if}
        {/if}
        </td><td> <a href="?a=order&m=update&id={$value->id}"><img src="view/admin/images/edit.gif" alt="编辑" title="编辑"/></a> <a href="?a=order&m=delete&id={$value->id}"><img src="view/admin/images/drop.gif" alt="删除" title="删除" onclick="return confirm('确认删除?') ? true : false;"/></a></td></tr>
        {foreachelse}
        <tr><td colspan="5">没有任何数据</td></tr>
        {/foreach}
    </table>
</div>
<div id="page">{$page} <input type="button" onclick="location.href='?a=order&m=clear'" value="清理24小时未确认订单"/><span style="color:red;">(*订单清理条件：未确认并且未发货并且未付款)</span></div>
</body>
</html>